<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>用户中心_{$web_name}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="Keywords" content="用户中心" />
		<meta name="Description" content="用户中心" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
		<meta name="format-detection" content="telephone=no">
		<tc_include file="Public:head" />
		<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/User/css/user.css" />
		<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/User/css/user_common.css" />
		<style type="text/css">
			.common-btn{display: block;text-align: center; text-decoration: none;font-size: 14px; width: 120px; height: 30px; line-height: 30px; background: #e31939; margin-right: 25px; margin-left: 10px; color: #ffffff; border: 0;cursor: pointer;}
			.inputBg {border: 1px solid #ddd; height: 30px; width: 200px; line-height: 30px;  padding: 0px 5px; margin-right: 5px; color: #333333;}
		</style>
	</head>

	<body>
		<php>
			if($_GET['id']){
				$uu_address="修改收货地址";
			}else{
				$uu_address="新增收货地址";
			}
		</php>
		<tc_include file="Public:nav" />
		<div class="w990" id="content" style="background: none;">
			<div class="margin-w1210 clearfix">
				<div class="w">
					<div class="breadcrumb clearfix">
						<a href="/" class="index">首页</a> <span class="crumbs-arrow">&gt;</span> <span class="last">用户中心</span></div>
				</div>
				<div class="blank"></div>
				<tc_include file="Public:user_left" />
				<div class="user-right">
					<div class="box">
			<div class="tabmenu">
				<ul class="tab pngFix">
					<li class="first active">{$uu_address}</li>
				</ul>
			</div>
			<div class="alert alert-success">
				<h4>操作提示：</h4>
				<ul>
					<li>您可对已有的地址进行编辑及删除，亦可新增收货地址</li>
				</ul>
			</div>
			<input type="hidden" id="adressid" value="{$rs.address_id|default='0'}">
			<input type="hidden" id="hidUrl" value="">
			<input type="hidden" id="provinceid" value="{$rs.province|default='0'}">
			<input type="hidden" id="cityid" value="{$rs.city|default='0'}">
			<input type="hidden" id="districtid" value="{$rs.district|default='0'}">
			<input type="hidden" value="{$rs.address_id|default='-1'}" id="AddressID">
			<div class="mar_top">
			<form action="" method="post" name="theForm">
				<table width="100%" border="0" cellpadding="10" cellspacing="1" bgcolor="#eeeeee">
					<tbody>
					<tr>
						<td align="right" width="10%">配送区域：</td>
						<td colspan="3" align="left">
							<select name="province" id="seleAreaNext" onchange="GetProvince();getSelCity();" class="inputBg">
								<option value="">请选择省</option>
							</select>
							<select name="city" id="seleAreaThird" onchange="getSelCity();" class="inputBg">
								<option value="">请选择市</option>
							</select>
							<select name="district" id="seleAreaFouth" class="inputBg">
								<option value="-1">请选择区</option>
							</select>
							(必填)
						</td>
					</tr>
					<tr>
						<td align="right" width="10%">收货人姓名：</td>
						<td align="left" width="40%"><input name="consignee" type="text" class="inputBg" id="Name" value="{$rs.consigner|default=''}">(必填) </td>
					</tr>
					<tr>
						<td align="right">详细地址：</td>
						<td align="left" colspan="3"><input name="address" type="text" class="inputBg" id="AddressInfo" style="width: 692px;" value="{$rs.address|default=''}">(必填)</td>
					</tr>
					<tr>
						<td align="right">手机：</td>
						<td align="left"><input name="mobile" type="text" class="inputBg" id="Moblie" value="{$rs.mobile|default=''}">(必填)</td>
					</tr>
					<tr>
						<td align="right">电话：</td>
						<td align="left"><input name="phone" type="text" class="inputBg" id="phone" value="{$rs.phone|default=''}"></td>
					</tr>
					<tr>
						<td align="right">邮编：</td>
						<td align="left"><input name="zip_code" type="text" class="inputBg" id="zip_code" value="{$rs.zip_code|default=''}"></td>
					</tr>
					<tr>
						<td colspan="4" align="center"><input type="button" name="button" class="common-btn" value="{$uu_address}" onclick="saveAddress()"></td>
					</tr>
				</tbody></table>
			</form>
			<div class="blank10"></div>
			</div>
		</div>
				</div>

			</div>
		</div>
		<div style="clear: both;"></div>

		<tc_include file="Public:footer" />
		
		<script type="text/javascript">
			$(function(){
				if($("#provinceid").val() == null) {
					provice_id = 0;
				} else {
					provice_id = $("#provinceid").val();
				}
				if($("#cityid").val() == null) {
					city_id = -1;
				} else {
					city_id = $("#cityid").val();
				}
				if($("#districtid").val() == null) {
					district_id = -1;
				} else {
					district_id = $("#districtid").val();
				}
	
				if(provice_id == 0) {
					initProvince('#seleAreaNext');
				} else {
					load('province', provice_id, 'city', city_id, 'district', district_id);
				}

			})
		</script>
		<script src="/themes/wnsc/Home/User/js/address.js"></script>
	</body>

</html>